package com.yang.crawler.thread.config;


import com.yang.crawler.thread.manager.ThreadPoolMonitorManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.ThreadPoolExecutor;

@Configuration
public class ThreadConfiguration {
    @Bean
    public ThreadPoolExecutor reptileArticleThreadPoolExecutor() {
        return ThreadPoolMonitorManager.buildThreadPoolMonitorByTemplate("reptileArticle");
    }

    @Bean
    public ThreadPoolExecutor asyncEventBusThreadPoolExecutor() {
        return ThreadPoolMonitorManager.buildThreadPoolMonitorByTemplate("asyncEventBus");
    }
}
